From: Kan-Ru Chen Date: Sat, 17 Dec 2011 10:24:18 +0000 (+0800) Subject: New patch. Fix tests X-Git-Tag: archive/raspbian/1.1.9+ds1-4+rpi1^2^2~224 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=2334b236096e0a19e040f8538e7c99703091e04f;p=opencc.git New patch. Fix tests --- diff --git a/debian/changelog b/debian/changelog index 808027b..bf8d943 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ opencc (0.3.0-1) unstable; urgency=low * New upstream release * Remove autotools-dev and quilt from Build-Depends * debian/patches/fix-big-endian-build.diff: merged upstream + * debian/patches/fix-new-test-cases.patch: New patch. -- Kan-Ru Chen Sat, 17 Dec 2011 16:41:49 +0800 diff --git a/debian/patches/fix-new-test-cases.patch b/debian/patches/fix-new-test-cases.patch new file mode 100644 index 0000000..c9c73de --- /dev/null +++ b/debian/patches/fix-new-test-cases.patch @@ -0,0 +1,29 @@ +Description: Fix new test cases + Copy nedded dict files to ${PROJECT_BINARY_DIR}/data for tests. +Author: Kan-Ru Chen + +--- a/data/CMakeLists.txt ++++ b/data/CMakeLists.txt +@@ -92,4 +92,10 @@ + ${CHINA_DICT_FILES} + DESTINATION + ${DIR_SHARE_OPENCC} +-) +\ No newline at end of file ++) ++ ++if (BUILD_TESTING) ++ foreach (DICT ${TAIWAN_DICT_FILES} ${CHINA_DICT_FILES}) ++ configure_file(${DICT} ${PROJECT_BINARY_DIR}/data COPYONLY) ++ endforeach (DICT) ++endif (BUILD_TESTING) +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,6 +20,7 @@ + cmake_minimum_required(VERSION 2.8) + set (PACKAGE_NAME opencc) + project (${PACKAGE_NAME} C) ++include (CTest) + enable_testing() + + ######## Package information diff --git a/debian/patches/series b/debian/patches/series index 8b13789..fb650d8 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ +fix-new-test-cases.patch